<!DOCTYPE html>
<html>
{% load staticfiles %}
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <title>注册</title>
    <link rel="stylesheet" type="text/css" href="{% static 'css/reset/reset.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/reset/login.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/ncss.css' %}">

    <style>
        body {
            background: #fff;
        }
    </style>
</head>
<body>
<div class="loginbox dialogbox">
    <h1>账号登录</h1>
    <div class="close jsCloseDialog"><img src="{% static 'images/dig_close.png' %}"></div>
    <div class="cont">
        <form id="jsLoginForm" autocomplete="off">

            <div class="box">
                <input type="text" name="account_l" id="account_l" placeholder="手机号/邮箱">
            </div>
            <div class="box">
                <input type="password" name="password_l" id="password_l" placeholder="请输入您的密码">
            </div>
            <div class="error btns login-form-tips" id="jsLoginTips"></div> <!--登录错误提示-->
            <div class="btns">
                <span><input type="checkbox" id="jsAutoLogin">&nbsp;自动登录</span>
                <span class="forget btn fr">忘记密码</span>
            </div>
            <div class="button">
                <input type="button" value="登录" id="jsLoginBtn">
            </div>
            <div class="btns">
                <span class="fr">没有账号？<span class="regist btn">立即注册</span></span>
            </div>
        </form>
    </div>
</div>
<div class="dialog" id="jsDialog">
    <!--提示弹出框-->
    <div class="successbox dialogbox" id="jsSuccessTips">
        <h1>成功提交</h1>
        <div class="close jsCloseDialog"><img src="{% static 'images/dig_close.png' %}"></div>
        <div class="cont">
            <h2>您的需求提交成功！</h2>
            <p></p>
        </div>
    </div>
</div>
<div class="bg" id="dialogBg"></div>


<div class="all_page_head">
    <div class="wp">
        <div class="all_page_head_message clearfix" style="height: 72px;width: 100%;">
            <a href="{% url 'index' %}"><img src="{% static 'images/logo_11261.png' %}" alt="" style="height: 72px" class="fl"></a>
            <div class="go_url_box fl" style="height: 72px;width: 300px;">
                <a href="{% url 'index' %}">
                    <div class="url_div_box fl" style="text-indent: 30px">首页</div>
                </a>
                <a href="{% url 'course:list' %}">
                    <div class="url_div_box fl">课程</div>
                </a>
                <a href="{% url 'course:list' %}?sort=price">
                    <div class="url_div_box fl">付费课程</div>
                </a>
                <a href="{% url 'org:teachers' %}">
                    <div class="url_div_box fl">教师</div>
                </a>
            </div>
            <div class="search_text fl">
                <span class="selectOption" id="jsSelectOption"
                      data-value="{% if s_type %}{{ s_type }}{% else %}course{% endif %}" style="display: none;">
                                {% if s_type == 'course' %}公开课{% endif %}
                </span>
                <input id="search_keywords" class="search_keywords_textarea" type="text" value="{{ keywords }}"
                       placeholder="搜索您想要的课程"/>
                <div class="search_keywords_btn" id="jsSearchBtn">Search</div>
            </div>
            <div class="my_img_course fl">
                {% if user.is_authenticated %}
                    <div class="if_user_auth">
                        <div class="fl"><a href="{% url 'users:mycourse' %}">
                            <div class="enter_my_course_center">我的课程</div>
                        </a></div>
                        <div class="user_auth_welcome">欢迎您,{% if user.nick_name %}{{ user.nick_name }}{% else %}
                            {{ user.username }}{% endif %}</div>
                        <a href="{% url 'logout' %}">
                            <div class="user_quit">Quit</div>
                        </a>
                        <div class="fl"><a href="{% url 'users:info' %}"><img class="if_user_auth_img"
                                                                              src="{{ user.image.url }}" alt=""></a>
                        </div>
                    </div>
                {% else %}
                    <div class="if_user_not_auth">
                        <div class="fl" style="width: 60px;height: 72px;"></div>
                        <a href="{% url 'register' %}">
                            <div class="url_div_box_rl fl">注册</div>
                        </a>
                        <a href="{% url 'login' %}">
                            <div class="url_div_box_rl fl">登陆</div>
                        </a>
                    </div>
                {% endif %}
            </div>
        </div>
    </div>
</div>

<section>
    <div class="c-box bg-box" style="background: #fff;">
        <div class="login-box clearfix" style="border: 20px;box-shadow: 0 8px 16px 0 rgba(28,31,33,.3);">
            <div class=" form-box">
                <div class="tab">
                    <h2 class="active">手机注册</h2>
                </div>
                <div class="tab-form">
                    <form id="mobile_register_form" method="post" action="{% url 'register' %}" autocomplete="off">

                        <div class="form-group marb20 {% if register_post_form.errors.mobile %}errorput{% endif %}">
                            <input id="jsRegMobile" name="mobile" type="text" placeholder="请输入您的手机号码">
                        </div>
                        <div class="form-group marb20 blur" id="jsRefreshCode">
                            {{ register_get_form.captcha }}
                        </div>
                        <div class="clearfix">
                            <div class="form-group marb8 verify-code {% if register_post_form.errors.code %}errorput{% endif %}">
                                <input id="jsPhoneRegCaptcha" name="code" type="text" placeholder="输入手机验证码">
                            </div>
                            <input class="verify-code-btn sendcode" id="jsSendCode" value="发送验证码">
                        </div>
                        <div class="form-group marb8 {% if register_post_form.errors.password %}errorput{% endif %}">
                            <input id="jsPhoneRegPwd" name="password" type="password" placeholder="请输入6-20位非中文字符密码">
                        </div>
                        <div class="error btns" id="jsMobileTips">
                            {% if register_post_form.errors %}{% for key,error in register_post_form.errors.items %}
                                {{ error }}{% endfor %}{% else %}{{ msg }}{% endif %}</div>
                        <div class="auto-box marb8">

                        </div>
                        <input class="btn btn-green" id="jsMobileRegBtn" type="button" value="注册并登录">
                        <input type="hidden" name="csrfmiddlewaretoken"
                               value="r20XuUA2E7Aw0becQXwBbl57JQLgmKXrBBLY1FlPzoKyjZxXrwHVn9cvfwDxXFco">
                        {% csrf_token %}
                    </form>
                </div>
                <p class="form-p">已有账号？<a href="{% url 'login' %}">[立即登录]</a></p>
            </div>
        </div>
    </div>
</section>

<input id="isLogin" type="hidden" value="False">
<script src="{% static 'js/jquery/jquery.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/jquery/unslider.js' %}" type="text/javascript"></script>
<script src="{% static 'js/jquery/validateDialog.js' %}" type="text/javascript"></script>
<script src="{% static 'js/login.js' %}" type="text/javascript"></script>
</body>
</html>





